import React from 'react'

import {E7FormCloud} from 'weaPortalTheme';
import {inject, observer} from "mobx-react";

export default class ContainerViewExtend extends React.Component{

    render(){
        const {data,tabId,isSetting} = this.props
        const {items}  = data
        let content = null
        let item
        if(items.length > 0 && items.find((element)=>(element.id == tabId))){
            item = items.find((element)=>(element.id == tabId))
            const {setting} = item
            if(isSetting == true){
                content = (
                    <E7FormCloud ecId={`${this && this.props && this.props.ecId || ''}_E7FormCloud@70suen`} loginInfo={setting} loginForm={setting} isNeedGetLoginInfo={true} isFormCloudSetting={true} ></E7FormCloud>
                )
            }else{
                content = (
                    <E7FormCloud ecId={`${this && this.props && this.props.ecId || ''}_E7FormCloud@1qi6lo`}  loginInfo={setting} loginForm={setting} ></E7FormCloud>
                )
            }

        }

        return (
            <div style={{height:'100%','display':'flex','flex-flow':'column','align-items':'center',overflow:'auto','position':'relative'}}>
                {content}
            </div>
        )
    }
}